package com.example.demo.react;

public class ChildrensPrice implements Price {

    @Override
    public int getPriceCode() {
        return Movie.CHILDRENS;
    }

    @Override
    public double getCharge(int dayRented) {
        double thisAmount = 1.5;
        if (dayRented > 3)
            thisAmount += (dayRented - 3) * 1.5;
        return thisAmount;
    }
}
